/*
 * Copyright 2010 - Jeremie Brebec
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.jb.sharedbills.shared.model;

import org.jb.sharedbills.shared.model.logic.BillCalculator;


public class MockEventData {

	
	public static Event createMockEvent() {
		
		Event event = new Event();
		event.setName("Ski");
		new BillCalculator(event);
		
		Member lolo = new Member("Lolo");
		Member toto = new Member("Toto");
		Member fredo = new Member("Fredo");
		Member titou = new Member("Titou");
		Member lylou = new Member("Tytou");
		Member sensei = new Member("Senseï");
		Member jacko = new Member("Jacko");
		
		event.getMembers().add( lolo );
		event.getMembers().add(toto);
		event.getMembers().add( fredo );
		event.getMembers().add( titou );
		event.getMembers().add( lylou );
		event.getMembers().add( sensei );
		event.getMembers().add( jacko );

		Group espace_aller = new Group("Espace Aller", toto, titou, lylou, sensei );
		Group espace_retour = new Group("Espace retour", toto, titou, lylou, fredo );
		Group logan_aller = new Group("Logan aller", lolo, fredo, jacko );
		Group logan_retour = new Group("Logan retour", lolo, sensei, jacko );
		Group sans_matos = new Group("Sans matos", fredo, sensei, jacko );
		
		event.getGroups().add( espace_aller );
		event.getGroups().add( espace_retour );
		event.getGroups().add( logan_aller );
		event.getGroups().add( logan_retour );
		event.getGroups().add( sans_matos );
		
		Group tous = event.getAllMembersGroup();
		
		event.getBills().add( new Bill( lolo, tous, 17.35, "Petit dej samedi") );
		event.getBills().add( new Bill( lolo, tous, 12.50, "Petit dej dimanche" ));
		event.getBills().add( new Bill( lolo, logan_retour, 19.01, "Bouffe retour"));
		event.getBills().add( new Bill( lolo, logan_retour, 46.10, "Peage retour"));
		event.getBills().add( new Bill( lolo, logan_retour, 46.06, "Essence retour"));
		event.getBills().add( new Bill( jacko, logan_aller, 46.10, "Peage aller"));
		event.getBills().add( new Bill( jacko, logan_aller, 22.0, "Bouffe aller"));
		event.getBills().add( new Bill( jacko, logan_aller, 12.0, "1/2 plein Lombard"));
		event.getBills().add( new Bill( jacko, logan_retour, 12.0, "1/2 plein Lombard"));
		event.getBills().add( new Bill( jacko, tous, 19.50, "Café dimanche"));
		event.getBills().add( new Bill( sensei, tous, 248.50, "Forfait samedi"));
		event.getBills().add( new Bill( sensei, tous, 21.53, "Course samedi"));
		event.getBills().add( new Bill( sensei, tous, 208.50, "La Potiniere"));
		event.getBills().add( new Bill( jacko, logan_aller, 45.0, "Essence aller"));
		event.getBills().add( new Bill( fredo, espace_retour, 6.95, "Petit dej lundi"));
		event.getBills().add( new Bill( fredo, espace_retour, 146.0, "Forfait lundi"));
		event.getBills().add( new Bill( sensei, sans_matos, 70.0, "Location matos"));
		event.getBills().add( new Bill( lylou, espace_aller, 96.0, "Essence aller"));
		event.getBills().add( new Bill( titou, espace_aller, 46.10, "Peage aller"));
		event.getBills().add( new Bill( lylou, tous, 120.0, "Course week-end"));
		event.getBills().add( new Bill( titou, tous, 27.92, "Course samedi"));
		event.getBills().add( new Bill( titou, espace_retour, 31.0, "Essence retour"));
		event.getBills().add( new Bill( titou, espace_retour, 21.06, "Bouffe retour"));
		event.getBills().add( new Bill( toto, espace_aller, 139.0, "Forfait vendredi"));
		event.getBills().add( new Bill( toto, espace_retour, 46.10, "Peage retour"));
		event.getBills().add( new Bill( toto, tous, 15.0, "Courses diverses vendredi"));
		event.getBills().add( new Bill( toto, espace_retour, 41.28, "1/2 essence retour"));
		event.getBills().add( new Bill( jacko, new Group("Titou", titou), 14.0, "2 cognac"));
		event.getBills().add( new Bill( jacko, new Group("Fredo", fredo), 14.0, "2 cognac"));
		event.getBills().add( new Bill( titou, new Group("Sensei", sensei), 70.0, "Cadeau thomas"));
		event.getBills().add( new Bill( titou, espace_retour, 41.28, "1/2 essence"));
		
		
		return event;
		
	}
}
